﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="ThietBiSo.LinQDB" %>
<%@ Import Namespace="ThietBiSo.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
     Website - bảng điều khiển
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
        MLoaiOnline mlsp = new MLoaiOnline();
        var mangdt = mlsp.FindAll();
        Online ss = (Online)ViewData["onlines"];
    %>
    <script type="text/javascript">
        function submitForm() {
            var F = document.forms[0];

            document.forms[0].submit();
        } 
    </script>
    <% using (Html.BeginForm("Edit", "online", FormMethod.Post, new { @enctype = "multipart/form-data" }))
       { %>
    <%: Html.ValidationSummary(true) %>
    <table>
     
    </table>
    <fieldset>
        <legend class="classFieldSet">Sửa hỗ trợ</legend>
        <table width="100%">
           <tr>
            <td class="classCreate">
                <input type="button" value="Luu" class="btn" onclick="submitForm();" />
            </td>
            <td class="classBack">
                <%: Html.ActionLink("Quay lại", "Index",null,new { @class = "classThem" })%>
            </td>
        </tr>
            <tr>
                <td class="tableLabel">
                    Loại hỗ trợ
                </td>
                <td class="tableField">
                    <%: Html.DropDownList("ddlLoaiOnline", new SelectList(mangdt, "MaLoaiOnline", "TenLoaiOnline",ss.MaLoaiOnline), "Chọn loại hỗ trợ", new { @style = "width:605px"})%>
                </td>
            </tr>
            <tr>
                <td class="tableLabel">
                    Tiêu đề
                </td>
                <td class="tableField">
                    <%:Html.TextBox("TieuDe", ss.TieuDe, new { @style="width:600px" })%>
                </td>
            </tr>           
            
            <tr>
                <td class="tableLabel">
                    Nick/email/điện thoại
                </td>
                <td class="tableField">
                    <%:Html.TextBox("TenOnline", ss.TenOnline, new { @style = "width:600px" })%>
                </td>
            </tr>
             <tr>
                <td class="tableLabel">
                    Thứ tự
                </td>
                <td class="tableField">
                    <%:Html.TextBox("ThuTu", ss.ThuTu)%>
                </td>
            </tr>
             
        </table>
    </fieldset>
    <% } %>
</asp:Content>

